package javafx.demo.pane;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class TestBorderPane extends Application {

	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage stage) {
		stage.setTitle("TitledPane");
		Scene scene = new Scene(new VBox(), 400, 250);
		scene.setFill(Color.GHOSTWHITE);

		BorderPane layout = new BorderPane();
		layout.setTop(new Rectangle(200, 50, Color.DARKCYAN));
		layout.setBottom(new Rectangle(200, 50, Color.DARKCYAN));
		layout.setCenter(new Rectangle(100, 100, Color.MEDIUMAQUAMARINE));
		layout.setLeft(new Rectangle(50, 100, Color.DARKTURQUOISE));
		layout.setRight(new Rectangle(50, 100, Color.DARKTURQUOISE));

		VBox root = (VBox) scene.getRoot();
		root.getChildren().addAll(layout);
		stage.setScene(scene);
		stage.show();
	}

}
